<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">	
<title>风速科技</title>
<link rel="stylesheet"    href="../jquery-ui-1.8.18/themes/base/jquery.ui.all.css" type="text/css" />
   
	<script     src="../jquery-ui-1.8.18/jquery-1.7.2.min.js"></script>
	<script type="text/javascript"    src="../jquery-ui-1.8.18/ui/jquery-ui.js"></script>
	<script    type="text/javascript"  src="../util/util.js"></script>
	 <script    type="text/javascript"   src="login.js"></script>
<style>
		body { font-size: 82.5%; }
		label, input { display:block; }
		input.text { margin-bottom:12px; width:95%; padding: .4em; }
		fieldset { padding:0; border:0; margin-top:25px; }
		h1 { font-size: 1.2em; margin: .6em 0; }
		div#users-contain { width: 350px; margin: 20px 0; }
		div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }
		div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }
		.ui-dialog .ui-state-error { padding: .3em; }
		.validateTips { border: 1px solid transparent; padding: 0.3em; }
	</style>
<script type="text/javascript">
	$(document).ready(function() {
		var name = $( "#name" ),
			password = $( "#password" ),
			allFields = $( [] ).add( name ).add( password ),
			tips = $( ".validateTips" );
		
		$( "#dialog-form" ).dialog({
			autoOpen: true,
    		 stack: false, /* here */
    		 zIndex: 9999,
			height: 300,
			width: 350,
			modal: true,
			buttons: {
				"登录": function() {
					login(tips,name,password);
				}
				//"取消": function() {
				//	$( this ).dialog( "close" );
				//}
			},
			close: function() {
				//allFields.val( "" ).removeClass( "ui-state-error" );
			}
		});
	
		//登录事件
		$( "#Login" )
			.button()
			.click(function() {
				$( "#dialog-form" ).dialog( "open" );
			});
	
	});
	
	</script>
</head>
<body>
<div class="demo">

<div id="dialog-form" title="用户登录">
	<p class="validateTips">请填入正确的用户ID和密码</p>

	<form>
	<fieldset>
		<label for="name">用户(联系人)</label>
		<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all" />
		<label for="password">密码</label>
		<input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all" />
	</fieldset>
	</form>
</div>


<button id="Login" >用户登录</button>

</div><!-- End demo -->


</body>
</html>
